from tortoise.fields import CharField
from application.model import TortoiseBaseModel


class ImageModel(TortoiseBaseModel):
    """
    图片表
    """
    md5: str = CharField(max_length=32, null=False, unique=True, description="MD5(图片URL)，唯一")
    url: str = CharField(max_length=1000, null=False, description="图片URL")

    class Meta:
        table: str = "image"
        table_description: str = "图片表"
